<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>第七周作业 - Even - A super concise theme for Hugo</title>
  <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="cuizx23333" /><meta name="description" content="第七周作业 1. Program with machine language according to the following c (1) Write your assembly code &amp;amp; machine code assembly code: 1 2 3 4 5 6 LOD # 1 STO X LOD X ADD # 3 STO Y HLT machine code: 1 2 3 4 5 6 00010010 00000001 00000110 01010000 00000010 01010000 00010001 00000011 00000110 01010001 00001010 00000000 (2)Explain machine code execution with the" /><meta name="keywords" content="Hugo, theme, even" />






<meta name="generator" content="Hugo 0.74.3 with theme even" />


<link rel="canonical" href="http://localhost:1313/post/homework_week7/" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">



<link href="/sass/main.min.b5a744db6de49a86cadafb3b70f555ab443f83c307a483402259e94726b045ff.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">


<meta property="og:title" content="第七周作业" />
<meta property="og:description" content="第七周作业 1. Program with machine language according to the following c (1) Write your assembly code &amp; machine code assembly code: 1 2 3 4 5 6 LOD # 1 STO X LOD X ADD # 3 STO Y HLT machine code: 1 2 3 4 5 6 00010010 00000001 00000110 01010000 00000010 01010000 00010001 00000011 00000110 01010001 00001010 00000000 (2)Explain machine code execution with the" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://localhost:1313/post/homework_week7/" />
<meta property="article:published_time" content="2020-10-19T00:00:00+00:00" />
<meta property="article:modified_time" content="2020-10-19T00:00:00+00:00" />
<meta itemprop="name" content="第七周作业">
<meta itemprop="description" content="第七周作业 1. Program with machine language according to the following c (1) Write your assembly code &amp; machine code assembly code: 1 2 3 4 5 6 LOD # 1 STO X LOD X ADD # 3 STO Y HLT machine code: 1 2 3 4 5 6 00010010 00000001 00000110 01010000 00000010 01010000 00010001 00000011 00000110 01010001 00001010 00000000 (2)Explain machine code execution with the">
<meta itemprop="datePublished" content="2020-10-19T00:00:00+00:00" />
<meta itemprop="dateModified" content="2020-10-19T00:00:00+00:00" />
<meta itemprop="wordCount" content="705">



<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="第七周作业"/>
<meta name="twitter:description" content="第七周作业 1. Program with machine language according to the following c (1) Write your assembly code &amp; machine code assembly code: 1 2 3 4 5 6 LOD # 1 STO X LOD X ADD # 3 STO Y HLT machine code: 1 2 3 4 5 6 00010010 00000001 00000110 01010000 00000010 01010000 00010001 00000011 00000110 01010001 00001010 00000000 (2)Explain machine code execution with the"/>

<!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->

</head>
<body>
  <div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/" class="logo">Even</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    <a href="/">
        <li class="mobile-menu-item">Home</li>
      </a><a href="/post/">
        <li class="mobile-menu-item">Archives</li>
      </a><a href="/tags/">
        <li class="mobile-menu-item">Tags</li>
      </a><a href="/categories/">
        <li class="mobile-menu-item">Categories</li>
      </a><a href="/about/">
        <li class="mobile-menu-item">About</li>
      </a>
  </ul>
</nav>
  <div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/" class="logo">Even</a>
</div>

<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
        <a class="menu-item-link" href="/">Home</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/post/">Archives</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/tags/">Tags</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/categories/">Categories</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/about/">About</a>
      </li>
  </ul>
</nav>
    </header>

    <main id="main" class="main">
      <div class="content-wrapper">
        <div id="content" class="content">
          <article class="post">
    
    <header class="post-header">
      <h1 class="post-title">第七周作业</h1>

      <div class="post-meta">
        <span class="post-time"> 2020-10-19 </span>
        
        
      </div>
    </header>

    <div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">Contents</h2>
  <div class="post-toc-content always-active">
    <nav id="TableOfContents">
  <ul>
    <li><a href="#第七周作业">第七周作业</a>
      <ul>
        <li><a href="#1-program-with-machine-language-according-to-the-following-c">1. Program with machine language according to the following c</a>
          <ul>
            <li><a href="#1-write-your-assembly-code--machine-code">(1) Write your assembly code &amp; machine code</a></li>
            <li><a href="#2explain-machine-code-execution-with-the-fetch-decode-execute-cycle">(2)Explain machine code execution with the fetch-decode-execute cycle</a></li>
            <li><a href="#3explain-functions-about-ir-pc-acc-registers-in-a-cpu">(3)Explain functions about IR, PC, ACC registers in a CPU</a></li>
            <li><a href="#4explain-physical-meaning-about-vars-a--c-in-a-machine">(4)Explain physical meaning about vars a &amp; c in a machine</a></li>
          </ul>
        </li>
        <li><a href="#简答题">简答题</a>
          <ul>
            <li><a href="#1what-are-stored-in-memory">(1)What are stored in memory?</a></li>
            <li><a href="#2can-a-data-or-a-instruction-stored-in-the-same-place">(2)Can a data or a instruction stored in the same place?</a></li>
            <li><a href="#3explain-instruction-format-with-example-instructions">(3)Explain Instruction Format with example instructions.</a></li>
          </ul>
        </li>
        <li><a href="#解释名词">解释名词</a></li>
      </ul>
    </li>
  </ul>
</nav>
  </div>
</div>
    <div class="post-content">
      <h1 id="第七周作业">第七周作业</h1>
<h2 id="1-program-with-machine-language-according-to-the-following-c">1. Program with machine language according to the following c</h2>
<h3 id="1-write-your-assembly-code--machine-code">(1) Write your assembly code &amp; machine code</h3>
<p>assembly code:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">LOD # 1
STO X
LOD X
ADD # 3
STO Y
HLT
</code></pre></td></tr></table>
</div>
</div><p>machine code:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">00010010 00000001
00000110 01010000
00000010 01010000
00010001 00000011
00000110 01010001
00001010 00000000
</code></pre></td></tr></table>
</div>
</div><h3 id="2explain-machine-code-execution-with-the-fetch-decode-execute-cycle">(2)Explain machine code execution with the fetch-decode-execute cycle</h3>
<p>从内存中取指令，指令译码，从寄存器或指令中去操作数，执行指令，把寄存器中的数据放到内存或其他处理。</p>
<h3 id="3explain-functions-about-ir-pc-acc-registers-in-a-cpu">(3)Explain functions about IR, PC, ACC registers in a CPU</h3>
<p>IR：指令寄存器，用来存储执行中的指令的寄存器。
PC：程序计数器，用于存放当前指令所在内存地址。
ACC：累加寄存器，用于暂时存放ALU运算结果。</p>
<h3 id="4explain-physical-meaning-about-vars-a--c-in-a-machine">(4)Explain physical meaning about vars a &amp; c in a machine</h3>
<p>它们是变量，存在两个不同的内存地址，各占8个字节。</p>
<h2 id="简答题">简答题</h2>
<h3 id="1what-are-stored-in-memory">(1)What are stored in memory?</h3>
<p>指令和数据。</p>
<h3 id="2can-a-data-or-a-instruction-stored-in-the-same-place">(2)Can a data or a instruction stored in the same place?</h3>
<p>不可以。</p>
<h3 id="3explain-instruction-format-with-example-instructions">(3)Explain Instruction Format with example instructions.</h3>
<p>前八位代表指令，后八位代表数据。其中，第四位代表要操作的是一个数据还是一个内存地址。</p>
<h2 id="解释名词">解释名词</h2>
<p>汇编语言（Assembly Language）：An assembly (or assembler) language, often abbreviated asm, is a low-level programming language for a computer, or other programmable device, in which there is a very strong (but often not one-to-one) correspondence between the language and the architecture&rsquo;s machine code instructions.<br>
编译（Compiler）：A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code.<br>
命令式语言（Imperative programming）：In computer science, imperative programming is a programming paradigm that uses statements that change a program&rsquo;s state.<br>
函数编程语言（Functional programming）：Functional programming is a programming paradigm — a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements.<br>
过程式编程（Procedural programming）：Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions (not to be confused with mathematical functions, but similar to those used in functional programming), simply contain a series of computational steps to be carried out. Any given procedure might be called at any point during a program’s execution, including by other procedures or itself.</p>

    </div>

    <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">Author</span>
    <span class="item-content">cuizx23333</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">LastMod</span>
    <span class="item-content">
        2020-10-19
        
    </span>
  </p>
  
  
</div>
<footer class="post-footer">
      
      <nav class="post-nav">
        <a class="prev" href="/post/homework_week8/">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default">第八周作业</span>
            <span class="prev-text nav-mobile">Prev</span>
          </a>
        <a class="next" href="/post/project_3_circuit/">
            <span class="next-text nav-default">第三次项目---用电路做加法</span>
            <span class="next-text nav-mobile">Next</span>
            <i class="iconfont icon-right"></i>
          </a>
      </nav>
    </footer>
  </article>
        </div>
        

  

  

      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="social-links">
      <a href="mailto:your@email.com" class="iconfont icon-email" title="email"></a>
      <a href="http://localhost:1313" class="iconfont icon-stack-overflow" title="stack-overflow"></a>
      <a href="http://localhost:1313" class="iconfont icon-twitter" title="twitter"></a>
      <a href="http://localhost:1313" class="iconfont icon-facebook" title="facebook"></a>
      <a href="http://localhost:1313" class="iconfont icon-linkedin" title="linkedin"></a>
      <a href="http://localhost:1313" class="iconfont icon-google" title="google"></a>
      <a href="http://localhost:1313" class="iconfont icon-github" title="github"></a>
      <a href="http://localhost:1313" class="iconfont icon-weibo" title="weibo"></a>
      <a href="http://localhost:1313" class="iconfont icon-zhihu" title="zhihu"></a>
      <a href="http://localhost:1313" class="iconfont icon-douban" title="douban"></a>
      <a href="http://localhost:1313" class="iconfont icon-pocket" title="pocket"></a>
      <a href="http://localhost:1313" class="iconfont icon-tumblr" title="tumblr"></a>
      <a href="http://localhost:1313" class="iconfont icon-instagram" title="instagram"></a>
      <a href="http://localhost:1313" class="iconfont icon-gitlab" title="gitlab"></a>
      <a href="http://localhost:1313" class="iconfont icon-bilibili" title="bilibili"></a>
  <a href="http://localhost:1313/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>

<div class="copyright">
  <span class="power-by">
    Powered by <a class="hexo-link" href="https://gohugo.io">Hugo</a>
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    Theme - 
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  

  <span class="copyright-year">
    &copy; 
    2017 - 
    2021<span class="heart"><i class="iconfont icon-heart"></i></span><span>olOwOlo</span>
  </span>
</div>

    </footer>

    <div class="back-to-top" id="back-to-top">
      <i class="iconfont icon-up"></i>
    </div>
  </div>
  
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>



<script type="text/javascript" src="/js/main.min.c12618f9a600c40bd024996677e951e64d3487006775aeb22e200c990006c5c7.js"></script>








</body>
</html>
